home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / GOTHIC.ZIP / GOTHIC.POV
Encoding:
Text File  |  1996-11-26  |  3.6 KB  |  110 lines

  1.  
  2. //-------------------------->
  3. //-------------------------->
  4. //-------------------------->
  5. //----                  ---->
  6. //----    GOTHIC.POV    ---->
  7. //----                  ---->
  8. //-------------------------->
  9. //-------------------------->
  10. //-------------------------->
  11.  
  12. /*
  13.  
  14. Think of a clock - draw a line from 12 down to the center,
  15. and from 9 over to the center. That gives you a quarter
  16. circle on the upper left (NOT good). Now try it again, but
  17. start at 11 and and draw down, then over to 9. See how you
  18. get a pointy slice?! Now do the opposite, from 1 straight
  19. down, and over to 3, for the right side pointy slice. Glue
  20. those together, and use them to difference a hole in a block
  21. of stone. :-) 
  22.  
  23. After I had the shapes figured out, I added some glass, and
  24. then some diagonal lead dividers.
  25.  
  26. */
  27.  
  28. // Gothic style arches!
  29.  
  30.         #include "colors.inc"
  31.         #include "textures.inc"
  32.         #include "glass.inc"
  33.         #include "skies.inc"
  34.         #include "marbteal.map"
  35.  
  36.         camera { location < 0, 30, -70 > look_at < 0, 30, 0 > }
  37.         light_source { < -30, 60, 120 > color rgb 2 }
  38.         light_source { <  20, 300, -300 > color rgb 2 }
  39.         background { color White }
  40.         sky_sphere { S_Cloud1 }
  41.         plane { y, 0 pigment { Coral } }
  42.  
  43. // Make the cutter, from one box, and two sections cut from cylinders. 
  44. // The curved pieces are moved 0.0001 towards the center, to avoid a
  45. // thin slice of "original material" when you do the final difference.
  46.  
  47.         #declare Cutter = union {
  48.  
  49.         // Large bottom box.
  50.         box { < -8, 0, 0 > < 8, 30, 6 > }
  51.  
  52.         // Left side curve.
  53.         difference {
  54.                 cylinder { < 0, 0, 0 > < 0, 0, 6 >, 7 }
  55.                 box { < -3, 0, -0.1 > < -8, 8, 6.1 > inverse }
  56.                 translate x * 3
  57.                 scale < 2, 3, 1 >
  58.                 translate < 0.0001, 30, 0 >
  59.                 } // End of difference.
  60.  
  61.         // Right side curve.
  62.         difference {
  63.                 cylinder { < 0, 0, 0 > < 0, 0, 6 >, 7 }
  64.                 box { < 3, 0, -0.1 > < 8, 8, 6.1 > inverse }
  65.                 translate x * -3
  66.                 scale < 2, 3, 1 >
  67.                 translate < -0.0001, 30, 0 >
  68.                 } // End of difference.
  69.  
  70.         } // End of union.
  71.  
  72. // Make one arch, with glass and lead.
  73.  
  74.         #declare One_Arch = union {
  75.  
  76.                 difference {
  77.                         box { < -10, 0, 0.1 > < 10, 65, 5.9 > }
  78.                         object { Cutter translate y * 10 }
  79.  
  80.                         texture { pigment { agate
  81.                                 color_map { M_MarbTeal }
  82.                                 scale 0.5 }
  83.                                 finish { Shiny } }
  84.  
  85.                         } // End of difference.
  86.  
  87.                 box { < -9, 1, 2.999 > < 9, 64, 3 >
  88.                         texture { T_Glass3 }
  89.                         normal { bumps 0.1 }
  90.                         } // End of box.
  91.  
  92.                 // These start *underground* --- sloppy!
  93.                 #declare A = -5 #while ( A <=50 )
  94.                         cylinder { < -9, A, 3 > < 9, A+14, 3 >, 0.1
  95.                                 pigment { Gray30 } }
  96.                         cylinder { <-9, A+14, 3 > < 9, A, 3 >, 0.1
  97.                                 pigment { Gray30 } }
  98.                 #declare A = A + 2.5 #end
  99.  
  100.                 } // End of union.
  101.  
  102. // Show a few of them.
  103.  
  104.         #declare A = -60 #while ( A <= 60 )
  105.                 object { One_Arch translate z * 37 rotate y * A }
  106.         #declare A = A + 30 #end
  107.  
  108. // End of this file.
  109.  
  110.